//
//  indextwoViewController.swift
//  WxToutiao
//
//  Created by YQ05 on 2018/4/26.
//  Copyright © 2018年 yons. All rights reserved.
//

import UIKit

class indextwoViewController: UIViewController {
    @IBOutlet weak var segmentedControl: UISegmentedControl!
    
    @IBOutlet weak var indexView: UIView!
    @IBOutlet weak var firstView: UIView!
    @IBOutlet weak var secondView: UIView!
    @IBAction func indexChanged(_ sender: UISegmentedControl) {
        switch segmentedControl.selectedSegmentIndex
        {
        case 0:
            indexView.isHidden = false
            firstView.isHidden = true
            secondView.isHidden = true
        case 1:
            indexView.isHidden = true
            firstView.isHidden = false
            secondView.isHidden = true
        case 2:
            indexView.isHidden = true
            firstView.isHidden = true
            secondView.isHidden = false
        default:
            break;
        }
    }
    override func viewDidLoad() {
        super.viewDidLoad()

        indexView.isHidden = false
        firstView.isHidden = true
        secondView.isHidden = true
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
